import { request } from '@/network/request.js';
// 获取所有的权限列表（树）
export const netRights = () => {
  return request({
    url: '/Maintain/GetAllTree',
  });
};
// 获取所有的权限列表（列表）
export const getRightsList = (params) => {
  return request({
    method: 'get',
    url: '/Maintain/SelectPermission',
    params,
  });
};
// 添加权限
export const addRights = (data) => {
  return request({
    url: '/Maintain/AddPermission/btn-rightadd',
    method: 'post',
    data,
  });
};
// 修改权限
export const editRights = (data) => {
  return request({
    url: '/Maintain/UpdatePermission/btn-rightupdate',
    method: 'post',
    data,
  });
};
// 删除权限
export const delRights = (params) => {
  return request({
    url: '/Maintain/DeletePermission/btn-rightdelete',
    method: 'get',
    params,
  });
};
